package com.example.librarysystem.Dao;

import com.example.librarysystem.entity.Borrower;
import org.springframework.stereotype.Component;

import java.util.List;

@Component("borrowerDao")
public interface BorrowerDao {
    Integer selectCount();
    Borrower selectByName(String name);
    Borrower selectById(int id);
    List<Borrower> selectAll(int currentPage, int pageSize);
    List<Borrower> selectByNameAndPhone(String name, String phoneNum, int currentPage, int pageSize);
    int selectByNameAndPhoneCount(String name, String phoneNum);
    void updateBorrowerAddress(Borrower borrower);
    void updateBorrowerPhone(Borrower borrower);
    void updateBorrowerEmail(Borrower borrower);
    void updateBorrowerPassword(Borrower borrower);
    void updateBorrowerAddressAndPhone(Borrower borrower);
    void deleteById(int id);
    void insertBorrower(Borrower borrower);
    void updateBreach(Borrower borrower);
}
